Skip to content

Convert resident tag to srkw tag - #596

Merged
kauereinbold merged 7 commits into
orcasound:mainfrom
dthaler:resident-to-srkw
Aug 18, 2026
Merged

Convert resident tag to srkw tag#596
kauereinbold merged 7 commits into
orcasound:mainfrom
dthaler:resident-to-srkw

Conversation

@dthaler

@dthaler dthaler commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

PODS-AI pre-populates the "resident" tag, but the OrcaHello tag is "srkw", so convert the former to the latter.

Fixes #595

Fixes orcasound#595

Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
@dthaler
dthaler requested a review from micowan as a code owner August 13, 2026 22:53
@dthaler dthaler added the moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net label Aug 13, 2026
@kauereinbold

Copy link
Copy Markdown
Member

Ran this locally with a few unreviewed candidates seeded the way PODS-AI writes them, tags pre-populated with resident. The conversion itself works: the card comes up as srkw;orca;whale and clicking Yes adds nothing extra, so the #595 mix is gone. Typing resident by hand still sticks, so the escape hatch in the comment works too.

Two findings:

  1. AddTag("srkw") still carries the side effect from Make managing tags easier when moderating candidates #561 that flips the SRKW radio to Yes. On the single detection page a resident candidate now loads with Yes preselected and Submit enabled before anyone has listened. On the candidates page the same record shows the srkw chips with nothing selected, because a later OnParametersSet pass resets Found while the tags stay converted. The two pages disagree on the same data, and the queue lands in the tag-without-radio state Update SRKW radio when manually adding srkw tag #567 was about. Doing the translation on the tag string before the AddTag calls, or clearing Found after converting, would keep the radio untouched.

  2. The new guard is case sensitive while the rest of the file compares tags with OrdinalIgnoreCase. A Resident slips through unconverted, and clicking Yes then gives Resident;srkw;orca;whale, the same mix as Moderator portal tags: SRKW vs resident #595. Detection.TagList.Contains("resident", StringComparer.OrdinalIgnoreCase) would line it up; RemoveTag already handles case itself. Might be theoretical if PODS-AI always writes lowercase.

One thing worth deciding rather than a finding: with srkw pre-filled, answering No leaves orca;whale on the record unless the moderator removes them by hand. Before this change a No left resident behind instead, so it's not worse, but if the intent is Dave Bain's "get rid of resident as a tag for now", dropping the tag without adding srkw would avoid both. Whichever way you go, I can retest quickly.

@dthaler

dthaler commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

@kauereinbold updated, please re-review. Yes PODS-AI always uses "resident" lower case today, but I updated this to use case-insensitive anyway. Thanks for the review and testing!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the moderator portal’s detection initialization to normalize PODS-AI-provided tags so they match OrcaHello’s current tag vocabulary, specifically preventing the legacy "resident" tag from persisting alongside the OrcaHello "srkw" workflow.

Changes:

  • Adds an initialization-time tag normalization step to remove "resident" when it is present on incoming detections.
  • Documents the intent of handling model-generated tag aliases in a single place (with room for future mappings).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

dthaler and others added 2 commits August 17, 2026 10:46
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@kauereinbold kauereinbold left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested at the latest head with the same kind of seeded candidates as before, plus one tagged Resident and one tagged orca;whale;resident. All three points from the last round are addressed. The resident tag is stripped on load on both the candidates and detection pages, nothing preselected, and Submit stays disabled until the moderator answers. Clicking Yes gives srkw;orca;whale with no leftovers, and the capital R variant is caught by the case-insensitive check. Answering No on a resident-only candidate now leaves the tags empty. Typing resident by hand still sticks, even after clicking Yes.

One small thing: the title and description still say convert, but the code now drops the tag without adding srkw. Might be worth a quick edit so the merge history reads right.

@kauereinbold
kauereinbold merged commit b446716 into orcasound:main Aug 18, 2026
21 checks passed
@dthaler
dthaler deleted the resident-to-srkw branch August 18, 2026 00:59
@kauereinbold kauereinbold moved this to shipped in OrcaHello Aug 18, 2026
@kauereinbold kauereinbold moved this to shipped in OrcaHello Aug 18, 2026
@kauereinbold kauereinbold moved this to shipped in OrcaHello Aug 18, 2026
@kauereinbold kauereinbold moved this from shipped to done in OrcaHello Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net

Projects

Status: done

Development

Successfully merging this pull request may close these issues.

Moderator portal tags: SRKW vs resident

3 participants